package com.example.utils;

import java.util.UUID;

/**
 * Created with IntelliJ IDEA.
 * Description:创建生成UUID工具类
 * User: bjc
 * Date: 2025-10-01
 * Time: 16:39
 */
public class UUIDUtil {
    /**
     * 生成一个36位的UUID
     * 方法默认会生成一个带"-"的UUID，如：91830768-8e5d-4aa9-ba7a-5e3cf7a1f906
     * @return
     */
    public static String uuid() {
        return UUID.randomUUID().toString();
    }
    /**
     * 生成一个32位的UUID
     * @return
     */
    public static String uuid32() {
        return UUID.randomUUID().toString().replace("-", "");
    }

}
